package cn.edu.scau.cmi.front.domain;

import java.util.List;

import cn.edu.scau.cmi.ema.domain.Adultertype;
import cn.edu.scau.cmi.ema.domain.Foodtype;
import cn.edu.scau.cmi.ema.domain.base.CmiPagination;
public class FrontEventPagination extends CmiPagination {
	
	public FrontEventPagination() {
	}
	
	private static final long serialVersionUID = 1L;

	//	页面使用的mainRootFoodtypes和mainRootAdultertypes使用6个基本的食物类型在界面供用户选择，每次listEvents控制器进入的时候，就update。
	//	默认是null,弊病：每次数据库都要查询，不是很合理，在FrontEventServiceImpl中设置单例的方法
	private List<Foodtype> mainRootFoodtypes = null;
	private Foodtype selectFoodtype = null;
	//	掺假类型
	private List<Adultertype> mainRootAdultertypes = null;
	private Adultertype selectAdultertype = null;
	
	
//	private int selectFoodtypeId = -1;
	
//	private final int[] timeQuantums = {-1, 1, 3, 6, 12};//时间范围，初始化的时候时-1，表示对时间不加限制
	
//	TODO 开始时间，结束时间
	private int timeQuantum = 0;
	private String searchEventName = "";//查找输入框中的事件名称
	//时间段， 以月为单位，-1表示所有的时间
//	private Integer eventType = -1;//所有事件类型为-1	


	
	//是否升序，true表示升序，false表示降序，默认降序。
//	TODO 用时间降序更合理
	private boolean isTimeDescending = true;

	public int getTimeQuantum() {
		return timeQuantum;
	}

	public void setTimeQuantum(int timeQuantum) {
		this.timeQuantum = timeQuantum;
	}

	public String getSearchEventName() {
		return searchEventName;
	}

	public void setSearchEventName(String searchEventName) {
		this.searchEventName = searchEventName;
	}

	public boolean getIsTimeDescending() {
		return isTimeDescending;
	}
	
	
	public void setisTimeDescending(boolean isTimeAscend) {
		this.isTimeDescending = isTimeAscend;
	}

	public List<Foodtype> getMainRootFoodtypes() {
		return mainRootFoodtypes;
	}

	public void setMainRootFoodtypes(List<Foodtype> foodtypes) {
		this.mainRootFoodtypes = foodtypes;
	}

	public Foodtype getSelectFoodtype() {
		return selectFoodtype;
	}

	public void setSelectFoodtype(Foodtype selectFoodtype) {
		this.selectFoodtype = selectFoodtype;
	}

	public List<Adultertype> getMainRootAdultertypes() {
		return mainRootAdultertypes;
	}

	public void setMainRootAdultertypes(List<Adultertype> mainRootAdultertypes) {
		this.mainRootAdultertypes = mainRootAdultertypes;
	}

	public Adultertype getSelectAdultertype() {
		return selectAdultertype;
	}

	public void setSelectAdultertype(Adultertype selectAdultertype) {
		this.selectAdultertype = selectAdultertype;
	}

}